package com.fingard.dsp.bank.reqrespobj.cashpool;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RetAtsBase;
import com.fingard.dsp.bank.reqrespobj.cashpool.Detail.RetAtsCPTQCashPoolTreeQryDetail;
import com.fingard.xml.XmlTextWriter;

public class RetAtsCPTQCashPoolTreeQry extends RetAtsBase {
    //执行状态码 0标识成功,其他均为失败
    public String respCode = "";
    //执行结果描述信息
    public String respInfo = "";
    //客户端产生的交易唯一标志
    public String trnId = "";
    //总笔数
    public String totalNum = "";


    public RetAtsCPTQCashPoolTreeQry(ReqRespHeader p_header){
        retHeader = p_header;
        retXmlWriter = new XmlTextWriter();//用于输出返回ATS的XML报文
    }

    public void writeDetail(RetAtsCPTQCashPoolTreeQryDetail CPTQDeatil) {
        retXmlWriter.writeStartElement("DetailRecord");

        retXmlWriter.writeElementString("CustomId", CPTQDeatil.customId);
        retXmlWriter.writeElementString("TreeNodeId", CPTQDeatil.treeNodeId);
        retXmlWriter.writeElementString("TreeParentNodeId", CPTQDeatil.treeParentNodeId);
        retXmlWriter.writeElementString("Level", CPTQDeatil.level);
        retXmlWriter.writeElementString("CustomNameCn", CPTQDeatil.customNameCn);
        retXmlWriter.writeElementString("UpCustomNameCn", CPTQDeatil.upCustomNameCn);
        retXmlWriter.writeElementString("HasChild", CPTQDeatil.hasChild);
        retXmlWriter.writeEndElement();
    }

    public void writeAfter() {
        retXmlWriter.writeElementString("RespCode", this.respCode);
        retXmlWriter.writeElementString("RespInfo", this.respInfo);
        retXmlWriter.writeElementString("TrnId", this.trnId);
        retXmlWriter.writeElementString("TotalNum", this.totalNum);
        retXmlWriter.writeEndDocument();
    }
}
